<?php /*a:1:{s:46:"D:\www\long_shop\app\view\order\order_log.html";i:1702389679;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<title>订单操作记录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>

<style>

</style>
</head>
<body >
<!--startprint-->
<div class="container-fluid" >

    <div class="" style="font-size: 1rem;">
        <div>订单号：<?php echo htmlentities($order['order_no']); ?></div>
        <div>下单人：<?php echo htmlentities($order['creater_name']); ?></div>
        <div>下单时间：<?php echo htmlentities($order['create_time']); ?></div>
        <div>状态：<?php echo htmlentities($order['status_name'][0]); ?></div>
    </div>

    <table class="table table-sm table-hover" style="width: initial;min-width: 100%;">
        <thead >
            <th>序号</th>
            <th>行为描述</th>
            <th>时间</th>
        </thead>
        <tbody>
            <?php foreach($list as $k=>$kv): ?>
            <tr>
                <td><?php echo htmlentities($k+1); ?></td>
                <td><?php echo htmlentities($kv['name']); ?></td>
                <td><?php echo htmlentities($kv['create_time']); ?></td>
            </tr>
            <?php endforeach; ?>

        </tbody>    
    </table>


</div>
<!--endprint-->
<!-- <div class="text-center" style="display: none;">
    <button class="btn btn-sm btn-primary" type="button" onclick="printpage();">
        <span class="bi-printer"></span> Print
    </button>
</div> -->

<div style="height:50px;text-align: center;color:#999"></div>
</body>

<script type="text/javascript">

  $(document).ready(function(){

  })

    function printpage(){
      let oldStr = window.document.body.innerHTML; // 获取body的内容
      let start = "<!--startprint-->"; // 开始打印标识, 17个字符
      let end = "<!--endprint-->"; // 结束打印标识
      let newStr = oldStr.substr(oldStr.indexOf(start) + 17); // 截取开始打印标识之后的内容
      newStr = newStr.substring(0, newStr.indexOf(end)); // 截取开始打印标识和结束打印标识之间的内容
      window.document.body.innerHTML = newStr; // 把需要打印的指定内容赋给body
      window.print(); // 调用浏览器的打印功能打印指定区域
      window.document.body.innerHTML = oldStr; // body替换为原来的内容
    }
</script>


</body>
</html>
